package com.ruoyi.web.controller.aj;

import com.ruoyi.aj.domain.AdmContacts1;
import com.ruoyi.aj.domain.Case_case_type;
import com.ruoyi.aj.service.IxzajService;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Wang
 * @Date: 2024/6/6 10:03
 * @Description:
 * 新增案件
 */


@RestController
@RequestMapping("/xzgj/ajlx")
@DataSource(DataSourceType.SLAVE)
public class XzajController {
    @Autowired
    private IxzajService service;

    //选择案件类型
    @GetMapping("/list1")
    public Object queryAllList(Case_case_type caseCaseType){
        List<Case_case_type> list =service.queryAllList(caseCaseType);
        //List<Case_case_type> list =service.list();
        return list;
    }
    //根据选择的案件显示二级类型
    @GetMapping("/list2")
    public Object queryAllList2(Integer id){
        List<Case_case_type> list =service.queryAllList2(id);
        //List<Case_case_type> list =service.list();
        return list;
    }
}